@import '../../var.less';

.asideBox {
  position: relative;
  width: 250px;
  background-color: var(--color-bg-200);
  overflow: hidden;
  transition: width 0.2s background 0.3s;
}

.searchTreeAside {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-width: 250px;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;

  .header {
    flex-shrink: 0;
  }

  .tree {
    flex: 1;
    overflow: auto;

    ::-webkit-scrollbar {
      display: none;
    }
  }
}

.searchTreeHeader {
  margin: 10px 10px 0px 10px;
}

.searchTreeOverview {
  margin: 0px 5px;
  display: flex;
  align-items: center;
  margin-top: 8px;
  height: 24px;
  border-radius: 2px;
  padding: 0px 10px;

  i {
    font-size: 16px;
    margin-right: 8px;
  }

  // &:hover{
  //   color: var(--custom-primary-color);
  //   background-color: var(--custom-primary-1);
  // }
}

.searchTreeSearchBox {
  width: 100%;
  display: flex;

  .inputBox {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    margin-right: 4px;
    border: 1px solid var(--color-border);
    border-radius: 4px;

    i {
      position: absolute;
      left: 5px;
      top: 50%;
      transform: translateY(-50%);
      margin-right: 10px;
    }
  }

  input {
    display: block;
    margin-left: 24px;
    flex: 1;
    box-shadow: none !important;
    padding: 0;
    border: none;
    outline: none;
    background-color: transparent;
  }

  .searchTreeButton {
    margin: 0px 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    background-color: var(--custom-primary-color);

    &:hover {
      filter: brightness(1.1);
    }

    i {
      color: var(--color-bg-100);
    }
  }

  .searchTreeRefresh {}

  .searchTreeCreate {}
}




.box {
  padding: 0px 5px 20px 5px;
  overflow: auto;
  height: calc(100% - 120px);
}

.treeNode {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 24px;
  border-radius: 2px;
  opacity: 1;
  cursor: pointer;
  transition: opacity 0.05s ease-in, height 0.1s ease-in;
  user-select: none;

  &:hover .right {
    background-color: var(--custom-primary-1);
    color: var(--custom-primary-color);
  }
}

.left {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.right {
  flex: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0px 10px;
  border-radius: 2px;
}

.arrows {
  flex-shrink: 0;
  width: 24px;
  transform: rotate(0deg);
  transition: transform 0.2s ease-in;
}

.arrowsIcon {
  display: inline-block;
}

.rotateArrowsIcon {
  transform: rotate(90deg);
}

.dblclickArea {
  display: flex;
  flex: 1;
}

.typeIcon {
  width: 20px;

  i {
    color: var(--custom-primary-color);
  }
}

.typeImg {
  height: 20px;
  width: 20px;
  background-repeat: no-repeat;
  background-size: 20px 20px;
}

.contentText {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.name {
  flex: 1;
  .f-lines(1);
}

.type {
  font-size: 12px;
  flex-shrink: 0;
  text-align: right;
  color: var(--custom-primary-4);
}

.indent {
  width: 24px;
  height: 100%;
  position: relative;

  &::before {
    position: absolute;
    top: 0;
    right: 6px;
    bottom: -4px;
    border-right: 1px solid var(--color-border);
    content: '';
  }
}

.hiddenTreeNode {
  height: 0;
  opacity: 0;
  transition: opacity 0.2s ease-in, height 0.1s ease-in;

  .arrows {
    transform: rotate(0deg);
    transition: transform 0.2s ease-in;
  }
}

.loadingIcon {
  display: inline-block;
  animation: loading-animation 1s infinite linear;
}